Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Raster Imaging Messages


GXRasterDataIn

You can override the GXRasterDataIn message to send data to a raster device for printing. Your override of the GXRasterDataIn message must match the following formal declaration:

OSErr MyRasterDataIn (gxOffscreenHdl offScreen, 
         gxRectangle *bandRectangle, gxRectangle *dirtyRectangle);
offScreen
Data representing this portion of the page.
bandRectangle
A pointer to a rectangle that defines the size and location of the band of data that is being passed in.
dirtyRectangle
A pointer to a rectangle that defines the area of bandRectangle that is occupied by shapes.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
QuickDraw GX, in its default implementation of the GXRenderPage message for raster drivers, sends the GXRasterDataIn message after rendering a single band of data. The raster driver sends page data to the device in response to this message. Since a page cannot always be rendered as a single bitmap, QuickDraw GX can send this message multiple times for a page.

You can override this message to convert the bitmaps sent by QuickDraw GX into a format that is acceptable for your raster device. You can call the GXBufferData or GXWriteData messages to send the data to the device.

The default implementation of the GXRasterDataIn message breaks the data up into smaller pieces by subdividing the bitmap into "head passes" as defined in the raster package resource. It then sends GXRasterLineFeed and GXRasterPackageBitmap messages to further break down the data and prepare it for the device.

SPECIAL CONSIDERATIONS
You never send the GXRasterDataIn message yourself.

You can totally override the GXRasterDataIn message, or you can modify the data in some way and then forward the message.

If you use the default implementation of the GXRasterDataIn message, you must define a raster package ('rpck') resource.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
SEE ALSO
The raster package resource is described on page 6-73 in the chapter "Printing Resources."

The GXRenderPage message is described on page 4-96.

The GXRasterLineFeed message is described on page 4-98.

The GXRasterPackageBitmap message is described on page 4-100.

The GXBufferData message is described on page 4-139.

The GXWriteData message is described on page 4-141.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help